import { Rule, RuleType } from '@midwayjs/validate';
import { ApiProperty } from '@midwayjs/swagger';
import { BaseError as R } from '../../../common/base.error';
import { requiredString } from '../../../common/common.validate.rules';
import { RoomManageEntity } from '../entity/roomManage';
import { BaseDTO } from '../../../common/base.dto';

export class RoomManageDTO extends BaseDTO<RoomManageEntity> {
 
  @ApiProperty({
    description: '名称',
  })
  @Rule(requiredString.error(R.validateError('房间名称不能为空')))
  name?: string;

  @ApiProperty({
    description: '类型',
  })
  @Rule(requiredString.error(R.validateError('房间类型不能为空')))
  type?: string;

  @ApiProperty({
    description: '状态'
  })
  @Rule(requiredString.error(R.validateError('房间状态不能为空')))
  status?: string

  @ApiProperty({
    description: '单价'
  })
  @Rule(requiredString.error(R.validateError('房间单价不能为空')))
  price?: string

  @ApiProperty({ description: '预定' })
  @Rule(RuleType.allow(null))
  ordered?: string

  @ApiProperty({ description: '使用状态' })
  @Rule(RuleType.allow(null))
  useStatus?: string

  
}

export class ListQuery {
  /** 状态 */
  status?: string

  /** 类型 */
  type?: string
}